REM (c) 2009 Joel Winarske 
REM All Rights Reserved

@Echo OFF
cls
pushd %_PLATFORMROOT%\%_TGTPLAT%


Echo Cleaning platform directory build logs "..."
for /F %%f in ('dir /s /b build.*') do del /f/q %%f >nul 2>&1
del /f /q %_PLATFORMROOT%\%_TGTPLAT%\*.bif >nul 2>&1


Echo Cleaning Cesysgen Files "...\cesysgen\files"
del /f /s /q %_PLATFORMROOT%\%_TGTPLAT%\cesysgen\files  >nul 2>&1
rd /s /q %_PLATFORMROOT%\%_TGTPLAT%\cesysgen\files >nul 2>&1


echo Cleaning platform directory "...\target\%_TGTCPU%\%wincedebug%"
del /f /s /q "%_PLATFORMROOT%\%_TGTPLAT%\target\%_TGTCPU%\%wincedebug%" >nul 2>&1
rd /s /q %_PLATFORMROOT%\%_TGTPLAT%\target >nul 2>&1


echo Cleaning platform directory "...\lib\%_TGTCPU%\%wincedebug%"
del /f /s /q "%_PLATFORMROOT%\%_TGTPLAT%\lib\%_TGTCPU%\%wincedebug%" >nul 2>&1
rd /s /q %_PLATFORMROOT%\%_TGTPLAT%\lib >nul 2>&1


Echo Cleaning platform object files "..."
for /F %%f in ('dir /s /ad /b %_PLATFORMROOT%\%_TGTPLAT%\obj') do del /f/s/q %%f >nul 2>&1 && rd /s/q %%f  >nul 2>&1



echo Cleaning flat release directory "%_FLATRELEASEDIR%"
del /s /q /f "%_FLATRELEASEDIR%\*.*" >nul  2>&1
rem rd /s /q %_FLATRELEASEDIR% >nul 2>&1


popd
@Echo ON